Field of the Invention
The present invention generally relates to computer software. More specifically, the present invention relates to a computer aided design application that allows users to modify a shadow cast by a light source in a 3-dimensional model (3D model).
Description of the Related Art
Currently, computer aided design (CAD) applications are available that allow a designer or engineer to generate computer models of real-world 3D objects. Such models are often used to generate a visual rendering of the real-world 3D object. A 3D model may vary from a model of a single, small object (e.g., a model of a teapot) to a model of a complicated architectural plan that includes buildings, landscaping, roads, etc.
One common feature provided by many CAD applications is to allow users to specify light sources within a 3D model. Based on the position of a light source and the shape of an object within the 3D model, the CAD application may be configured to generate a realistic appearance of shadows in the 3D model. For example, a 3D model of a building may include a distant light source representing light from the sun. The sunlight may be used to generate shadows that accentuate elements of a building's design, and not necessarily to model how the shadows cast from the building appear at a particular date and time. That is, shadows may be used to present a visual display of objects within the 3D model in an aesthetically pleasing manner, rather than for analytical accuracy.
Typically, however, the distant light source is not an object within a 3D model. That is, the light source is not an object appearing in the space defined for the 3D model that may be directly manipulated. Rather, a distant light source is oftentimes specified using a vector that represents the direction at which light rays from the distant light source strike objects present in the 3D model. Consequently, the appearance and position of shadows cast by these objects is determined from this vector. Thus, to alter the appearance and position of a shadow, data specified for the vector must be modified, and then the impact on a particular shadow can be ascertained.
One drawback to this approach is that the impact of a given modification is apparent only after the position of the distant light source is changed. Thus, a user may be forced to repeat this process many times before achieving a desired effect. Alternatively, users may manually modify an image generated from the 3D model (e.g., a .jpg or .png file) using an additional software tool. This allows users to essentially “paint” shadows that have a desired appearance. However, if the user changes the position or appearance of objects within the 3D model, the shadows must again be “painted” onto the image.
Additionally, the analytical accuracy of a shadows cast by an object within the 3D model may sometimes be relevant. For example, consider an architect composing a 3D model of a proposed structure bordering a greenhouse. The architect may wish to determine whether the location and shape of the proposed structure would cast an unacceptable shadow over the greenhouse. Similarly, some municipalities have enacted land-use regulations limiting what shadows a structure may cast over certain locations (e.g., specifying that a public fountain must be in the sun for a certain number of hours of the day). For these reasons, some CAD applications include features that allow users to perform a “sun study” that will determine how shadows cast by a proposed structure may impact on neighboring properties. The appearance and position of shadows may be determined from the position of the sun, and the geographic location of the structure, as specified by the 3D model. One drawback to this approach, however, is that a user may inadvertently specify a position of a light source that is not physically possible.
Accordingly, there is a need in the art for a more efficient technique to manipulate shadows in a 3D model and to indicate whether a derived shadow configuration is feasible, given the parameters of the 3D model.